package com.edward.model;

import java.util.Date;
import java.util.List;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

@Entity
public class ContractList {
	
	private int id;

	private String maifang;
	
	private String buyer;
	
	private String bdizhi;
	
	private String baddr;
	
	private String btel;
	
	private String shoufang;
	
	private String seller;
	
	private String sdizhi;
	
	private String saddr;
	
	private String stel;
	
	private String num;
	
	private Date date;
	
	private String didian;
	
	private String location;
	
	private double total;
	
	private String sud;
	
	private String cong;
	
	private String dao;
	
	private String f;
	
	private String t;
	
	private String tiaojian;
	
	private String payment;
	
	private String qita;
	
	private String other;
	
	private Date time;
	
	private String listNum;
	
	private List <ContractItem> items;
	
	@Id
	@GeneratedValue
	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}
	
	public String getListNum() {
		return listNum;
	}

	public void setListNum(String listNum) {
		this.listNum = listNum;
	}

	public String getMaifang() {
		return maifang;
	}

	public void setMaifang(String maifang) {
		this.maifang = maifang;
	}

	public String getBuyer() {
		return buyer;
	}

	public void setBuyer(String buyer) {
		this.buyer = buyer;
	}

	public String getBdizhi() {
		return bdizhi;
	}

	public void setBdizhi(String bdizhi) {
		this.bdizhi = bdizhi;
	}

	public String getBaddr() {
		return baddr;
	}

	public void setBaddr(String baddr) {
		this.baddr = baddr;
	}

	public String getBtel() {
		return btel;
	}

	public void setBtel(String btel) {
		this.btel = btel;
	}

	public String getShoufang() {
		return shoufang;
	}

	public void setShoufang(String shoufang) {
		this.shoufang = shoufang;
	}

	public String getSeller() {
		return seller;
	}

	public void setSeller(String seller) {
		this.seller = seller;
	}

	public String getSdizhi() {
		return sdizhi;
	}

	public void setSdizhi(String sdizhi) {
		this.sdizhi = sdizhi;
	}

	public String getSaddr() {
		return saddr;
	}

	public void setSaddr(String saddr) {
		this.saddr = saddr;
	}

	public String getStel() {
		return stel;
	}

	public void setStel(String stel) {
		this.stel = stel;
	}

	public String getNum() {
		return num;
	}

	public void setNum(String num) {
		this.num = num;
	}

	@Temporal(TemporalType.DATE)
	public Date getDate() {
		return date;
	}

	public void setDate(Date date) {
		this.date = date;
	}

	public String getDidian() {
		return didian;
	}

	public void setDidian(String didian) {
		this.didian = didian;
	}

	public String getLocation() {
		return location;
	}

	public void setLocation(String location) {
		this.location = location;
	}

	public double getTotal() {
		return total;
	}

	public void setTotal(double total) {
		this.total = total;
	}

	public String getSud() {
		return sud;
	}

	public void setSud(String sud) {
		this.sud = sud;
	}

	public String getCong() {
		return cong;
	}

	public void setCong(String cong) {
		this.cong = cong;
	}

	public String getDao() {
		return dao;
	}

	public void setDao(String dao) {
		this.dao = dao;
	}

	public String getF() {
		return f;
	}

	public void setF(String f) {
		this.f = f;
	}

	public String getT() {
		return t;
	}

	public void setT(String t) {
		this.t = t;
	}

	public String getTiaojian() {
		return tiaojian;
	}

	public void setTiaojian(String tiaojian) {
		this.tiaojian = tiaojian;
	}

	public String getPayment() {
		return payment;
	}

	public void setPayment(String payment) {
		this.payment = payment;
	}

	public String getQita() {
		return qita;
	}

	public void setQita(String qita) {
		this.qita = qita;
	}

	public String getOther() {
		return other;
	}

	public void setOther(String other) {
		this.other = other;
	}

	@Temporal(TemporalType.DATE)
	public Date getTime() {
		return time;
	}

	public void setTime(Date time) {
		this.time = time;
	}

	@OneToMany(fetch = FetchType.EAGER)
	@JoinColumn(name="CONTRACT_ID")
	public List<ContractItem> getItems() {
		return items;
	}

	public void setItems(List<ContractItem> items) {
		this.items = items;
	}
	
	

	

}
